package concurrency;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import net.mindview.util.CountingIntegerList;

class SynchronizedArrayListTest extends ListTest {
    SynchronizedArrayListTest(int readers, int writers) {
        super("Synched ArrayList", readers, writers);
    }

    @Override
    List<Integer> containerInitializer() {
        CountingIntegerList countingIntegerList = new CountingIntegerList(sContainerSize);
        ArrayList<Integer> arrayList = new ArrayList<Integer>(countingIntegerList);
        return Collections.synchronizedList(arrayList);
    }
}
